﻿using DataServer.CommonLib.Models.DataBase;
using Swimj.CommonLib.Base;
using Swimj.Core.DependencyInjection;

namespace DataServer.ApplicationLib.Services
{
    public interface IDatabaseService : IScopedDependency
    {
        Task<Result<DatabaseInfoResponseDto>> CreateDatabaseAsync(DatabaseEditRequestDto model);

        Task<Result<DatabaseInfoResponseDto>> GetDatabaseAsync(Guid id);

        Task<Result<DatabaseInfoResponseDto>> UpdateDatabaseAsync(Guid id, DatabaseEditRequestDto model);

        Task<Result<IList<DatabaseInfoResponseDto>>> QueryDatabasesAsync(DatabaseSearchRequestDto model);

        Task<PaginatedResult<DatabaseInfoResponseDto>> QueryDatabasesByPageAsync(DatabaseSearchRequestDto model);

        Task<Result<DatabaseInfoResponseDto>> TestConnDatabaseAsync(Guid id);
    }
}
